package com.jianan.mis.data.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the department table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="department"
 */

public abstract class BaseDepartment  implements Serializable {

	public static String REF = "Department";
	public static String PROP_NAME = "Name";
	public static String PROP_CONTRACT_END_DATE = "ContractEndDate";
	public static String PROP_TOTAL_DEPOSIT = "TotalDeposit";
	public static String PROP_CONTRACT_START_DATE = "ContractStartDate";
	public static String PROP_ID = "Id";
	public static String PROP_REMARK = "Remark";


	// constructors
	public BaseDepartment () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseDepartment (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseDepartment (
		java.lang.Integer id,
		java.lang.String name,
		java.math.BigDecimal totalDeposit,
		java.util.Date contractStartDate,
		java.util.Date contractEndDate) {

		this.setId(id);
		this.setName(name);
		this.setTotalDeposit(totalDeposit);
		this.setContractStartDate(contractStartDate);
		this.setContractEndDate(contractEndDate);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String name;
	private java.math.BigDecimal totalDeposit;
	private java.util.Date contractStartDate;
	private java.util.Date contractEndDate;
	private java.lang.String remark;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: name
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: name
	 * @param name the name value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: total_deposit
	 */
	public java.math.BigDecimal getTotalDeposit () {
		return totalDeposit;
	}

	/**
	 * Set the value related to the column: total_deposit
	 * @param totalDeposit the total_deposit value
	 */
	public void setTotalDeposit (java.math.BigDecimal totalDeposit) {
		this.totalDeposit = totalDeposit;
	}



	/**
	 * Return the value associated with the column: contract_start_date
	 */
	public java.util.Date getContractStartDate () {
		return contractStartDate;
	}

	/**
	 * Set the value related to the column: contract_start_date
	 * @param contractStartDate the contract_start_date value
	 */
	public void setContractStartDate (java.util.Date contractStartDate) {
		this.contractStartDate = contractStartDate;
	}



	/**
	 * Return the value associated with the column: contract_end_date
	 */
	public java.util.Date getContractEndDate () {
		return contractEndDate;
	}

	/**
	 * Set the value related to the column: contract_end_date
	 * @param contractEndDate the contract_end_date value
	 */
	public void setContractEndDate (java.util.Date contractEndDate) {
		this.contractEndDate = contractEndDate;
	}



	/**
	 * Return the value associated with the column: remark
	 */
	public java.lang.String getRemark () {
		return remark;
	}

	/**
	 * Set the value related to the column: remark
	 * @param remark the remark value
	 */
	public void setRemark (java.lang.String remark) {
		this.remark = remark;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jianan.mis.data.domain.Department)) return false;
		else {
			com.jianan.mis.data.domain.Department department = (com.jianan.mis.data.domain.Department) obj;
			if (null == this.getId() || null == department.getId()) return false;
			else return (this.getId().equals(department.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}